<template>
	
	<view class="layui-table-view">
		
		<div class="layui-table-box">
		
				<div class="layui-table-body layui-table-main">
					<table class="layui-table">
		
						<thead>
							<tr>
								<th class="layui-table-col-special" v-if="canSelect">
									<div class="layui-table-cell laytable-cell-checkbox">
										<checkGroup name="checkAll" ></checkGroup>
									</div>
								</th>
								<slot name="head"></slot>
							</tr>
						</thead>
		
						<tbody>
							
							<slot name="body"></slot>
							
						</tbody>
					</table>
				</div>
				
				
			</div>
		
	</view>
	
</template>

<script>
	export default {
		name: "tableList",
		props: {
			needOperate : {
				type: Boolean,
				default: true
			},
			canSelect: {
				type: Boolean,
				default: false
			},
			list: {
				type: Array,
				default: function(e) {
					return [];
				}
			}
		},

		data() {
			return {
				dataList : []
			};
		}
	}
</script>

<style lang="scss">
	.layui-table-view .layui-table{
		width: 100%;
	}
</style>
